home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / python2.4 / test / test_future3.pyo (.txt) < prev    next >
Python Compiled Bytecode  |  2005-10-18  |  1KB  |  40 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.4)
  3.  
  4. from __future__ import nested_scopes
  5. from __future__ import division
  6. import unittest
  7. from test import test_support
  8. x = 2
  9.  
  10. def nester():
  11.     x = 3
  12.     
  13.     def inner():
  14.         return x
  15.  
  16.     return inner()
  17.  
  18.  
  19. class TestFuture(unittest.TestCase):
  20.     
  21.     def test_floor_div_operator(self):
  22.         self.assertEqual(7 // 2, 3)
  23.  
  24.     
  25.     def test_true_div_as_default(self):
  26.         self.assertAlmostEqual(7 / 2, 3.5)
  27.  
  28.     
  29.     def test_nested_scopes(self):
  30.         self.assertEqual(nester(), 3)
  31.  
  32.  
  33.  
  34. def test_main():
  35.     test_support.run_unittest(TestFuture)
  36.  
  37. if __name__ == '__main__':
  38.     test_main()
  39.  
  40.